<template>
	<view class="list">
	<view class="idea" v-if="ideaList.length>0">
		<view class="idea-list" v-for="(item,index) in ideaList" :key="index" >
			<view class="idea-wrapper">
				<view class="idea-item">
					<view class="idea-text">{{item.content}}</view>
					<view class="idea-time">{{item.create_time}}</view>
					<text class="idea-solve" style="color: #969993;">
						<text style="padding-right: 5px;" v-if="item.status==0">{{item.status_text}}</text>
						<text style="padding-right: 5px;color: #D94600;" v-else>{{item.status_text}}</text>
						<image src="/static/images/xia_icon.png"></image>
					</text>
					
				</view>
			</view>
			<view class="idea-wrapper" style="background-color: #F9F9F9;" v-if="item.reply">
				<view class="idea-item" >
					<view class="idea-text" style="width: 100%;">客服：{{item.reply}}</view>
					<view class="idea-time">{{item.update_time}}</view>
				</view>
			</view>
			<view class="idea-wrapper" style="background-color: #F9F9F9;" v-else>
				<view class="idea-item" >
					<view class="idea-text" style="padding: 10px 0;width: 100%;">暂无回复</view>
				</view>
			</view>
		</view>
	
	</view>
	<view class="order-none" v-else>
		<view>暂无反馈</view>
	</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				 ideaList:""
				}
		},
		onLoad() {
			this.getfeedbackList()
		},
		methods:{
			//反馈列表获取
			getfeedbackList() {
				this.$http.get('/user/feedbackList').then((response) => {
					const res = response.data.data;
					console.log(res);
					this.ideaList = res.data;

				})
			},
		}
	 }
	
</script>

<style>
	.list{
		width: 100%;
		background-color: #fff;
	}
	.idea{
			font-size: 16px;
			background-color: #fff;
		    position: relative;
		    height: 100%;
		    width: 100%;
			padding-bottom: 30px;
	}
	.idea-list{
		background-color: #fff;
		margin: 15px 20px;
		border-radius: 5px;
box-shadow:0px 0px 15px 0px rgba(0,0,0,0.04);
	}
	.idea-time{
	    color: #969993;	
		padding: 5px 0 20px 0;
		font-size: 12px;
	}
	.idea-wrapper{
		position: relative;
		border-radius: 0 0 5px 5px;
	}
	.idea-text{
		width: 85%;
		padding: 20px 0px 0 0px;
	}
	.idea-item{
		padding: 0px 20px 0 20px;
	}
	.idea-solve{
	    position: absolute;
	    top: 25px;
	    right: 10px;
	    color: #D94600;
	}
	.idea-solve image{
		width: 13px;
		height: 7px;
	}
	.order-none{
		text-align: center;
		padding: 200upx 0;
	}
	.order-none-img{
		width: 274upx;
		height: 274upx;
	}
</style>
